﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Epona.Domain.Query.Impl
{
    public class NotCriterion:AbstractCriterion
    {
        public IQueryCriterion Criterion { private set; get; }

        public NotCriterion(IQueryCriterion criterion)
        {
            this.Criterion = criterion;
        }

        public override string ToQueryString()
        {
            return "not (" + Criterion.ToQueryString() + ")";
        }

        public override NamedParameters GetParameters()
        {
            return Criterion.GetParameters();
        }
    }
}
